//
//  CDModelClick.m
//  Message
//
//  Created by zhongweiMacPro on 2021/7/16.
//  Copyright © 2021 com.liu.message. All rights reserved.
//

#import "CDModelClick.h"
#import "LWFuncView.h"
#import "UIColor+LSTColor.h"
#import "UIView+LSTView.h"
#import "CCDTableViewCell.h"
#import "ZGDeviceInfo.h"
#import "CDModelClick.h"
#import "LSTPopView.h"
#import "MJEncryptStringData.h"

// MainScreen Height&Width
#define Main_Screen_Height      [[UIScreen mainScreen] bounds].size.height

#define Main_Screen_Width       [[UIScreen mainScreen] bounds].size.width

@interface CDModelClick()

@property (nonatomic, strong) LWFuncView *sideView;

@property (nonatomic, strong) LSTPopView *popView;


@end

@implementation CDModelClick

+ (instancetype)currentScreenInfo {
    static CDModelClick *screenInfo = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        screenInfo = [[self alloc] init];
    });
    return screenInfo;
}

- (void)playFuncName:(NSString *)funcName {
    
    __weak typeof(self) weakSelf = self;
    
    if ([funcName isEqualToString:mj_OCString(_3867101821)]) {
        
        NSString *urlStr = [NSString stringWithFormat:@"%@", mj_OCString(_4064956054)];
        
        NSURL *URL = [NSURL URLWithString:urlStr];
        
        [[UIApplication sharedApplication] openURL:URL options:@{} completionHandler:^(BOOL success) {
            
            
        }];
        
    } else if ([funcName isEqualToString:mj_OCString(_1105022233)]) {
        
        NSString *urlStr = [NSString stringWithFormat:@"%@", mj_OCString(_3894585273)];
        
        NSURL *URL = [NSURL URLWithString:urlStr];
        
        
        //        [[UIApplication sharedApplication]openURL:URL];
        
        [[UIApplication sharedApplication] openURL:URL options:@{} completionHandler:^(BOOL success) {
            
            
        }];
        
    } else if ([funcName isEqualToString:mj_OCString(_3963719290)]) {
        
#warning 设置是否免费的地方+++++++++++++++++++++++++++++++++++++++++++++++++++++
            //这里设置是否为免费插件  YES代表免费  NO为不免费
            [CDModelClick currentScreenInfo].isS = YES;
#warning 设置是否免费的地方+++++++++++++++++++++++++++++++++++++++++++++++++++++
             
        
        
        if (_sideView) {
            
            
        } else {
            
            self.sideView = [[LWFuncView alloc] initWithFrame:CGRectMake(0, 0, 180,260)];
            self.sideView.titleArr = @[@"京",@"维吉妮娅",@"露西娅"];
                
            self.popView = [LSTPopView initWithCustomView:self.sideView
                                               parentView:[UIApplication sharedApplication].keyWindow
                                                 popStyle:LSTPopStyleSpringFromLeft
                                             dismissStyle:LSTDismissStyleSmoothToLeft];
            self.popView.hemStyle = LSTHemStyleLeft;
            self.popView.groupId = mj_OCString(_1970084037);
            self.popView.isStack = YES;
            if (Main_Screen_Width > 667) {
                
                self.popView.adjustX = 44;
            }
            
            self.popView.popDuration = 0.5;
            self.popView.bgAlpha = 0.0;
            self.popView.dismissDuration = 0.5;
            self.popView.isClickFeedback = YES;
            self.popView.bgClickBlock = ^{
                
                [weakSelf.popView dismiss];
            };
        }
        
        [self.popView pop];
        
        
    }
    
}




@end
